const mongoose = require('mongoose');
const Schema = mongoose.Schema;

// 定义Tab模型的schema
const TabSchema = new Schema({
  id: {
    type: String,
    required: true,
    unique: true
  },
  name: {
    type: String,
    required: true
  },
  scale: {
    type: Number,
    default: 1
  },
  offsetX: {
    type: Number,
    default: 0
  },
  offsetY: {
    type: Number,
    default: 0
  }
});

// 导出模型
module.exports = mongoose.model('Tab', TabSchema);